using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class UseNativeSize:MonoBehaviour {
	Image image;
	void Start() {
		image=GetComponent<Image>();

	}
	void Update() {
		Sprite currentSprite = image.sprite;
		if(!currentSprite) return;
		image.rectTransform.sizeDelta=currentSprite.rect.size;
	}
}
